-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed httpd logger to get user from query params #3304
Conversation
To be clear, this change adds |
This fixes logging the user who requested the query. It was not correctly logging the user when you did query param auth. You can see my u value in those requests were root, but they could be any user. |
The logging checks for other types of auth. User in url (not sure what that is) and the basic auth header as defined by the RFC. |
OK, thanks @jhorwit2 , I see what you are doing, makes sense to me. You will need to rebase this code before we can merge it. |
I think the original reason it wasn't in the logger as parameters aren't usually considered to have "user" information in them. I don't see the harm in this, as I don't think any of our other endpoints use the +1 |
@otoolep rebased 👍 |
Fixed httpd logger to get user from query params
A static initialization is not desirable in the main binaries, as it forces all paths of code to init, but it is still useful in tests. It allows static intialization to be performed once for all tests and eliminates the need to always add the FluxInit call. Added a fluxinit/static package that calls fluxinit.FluxInit() to replace the builtin package. This hides the nature of the initialization and makes it clear that it is mandatory initialization code getting called.
A static initialization is not desirable in the main binaries, as it forces all paths of code to init, but it is still useful in tests. It allows static intialization to be performed once for all tests and eliminates the need to always add the FluxInit call. Added a fluxinit/static package that calls fluxinit.FluxInit() to replace the builtin package. This hides the nature of the initialization and makes it clear that it is mandatory initialization code getting called.
A static initialization is not desirable in the main binaries, as it forces all paths of code to init, but it is still useful in tests. It allows static intialization to be performed once for all tests and eliminates the need to always add the FluxInit call. Added a fluxinit/static package that calls fluxinit.FluxInit() to replace the builtin package. This hides the nature of the initialization and makes it clear that it is mandatory initialization code getting called.
Before
After